import { BaseUrl, GetHeader } from "./config"
import store from "@/store/index.js"

export default function(options) {
	return new Promise((resolve, reject) => {
		uni.request({
			...options,
			header: {
				
				...options.header
			},
			url: `${BaseUrl}${options.url}`,
			success: async res => {
				resolve(res)
			},
			fail: reject
		})
	})
}
